package com.jielihaofeng.site.article.convert;

import com.jielihaofeng.site.article.entity.ArticleEntity;
import com.jielihaofeng.site.article.vo.ArticleVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 个人网站-文章管理
 *
 * @author 借力好风 949394048@qq.com
 * @since 1.0.0 2022-07-21
 */
@Mapper(uses = ListToStringTransform.class)
public interface ArticleConvert {
    ArticleConvert INSTANCE = Mappers.getMapper(ArticleConvert.class);

    ArticleEntity convert(ArticleVO vo);

    ArticleVO convert(ArticleEntity entity);

    List<ArticleVO> convertList(List<ArticleEntity> list);

}